const express=require('express')
const pool=require('../pool.js')
var router=express.Router()


router.get('/list',function(req,res){
var pno=req.query.pno
var count=req.query.count	
if(!pno) pno=1
if(!count) count=5
pno=parseInt(pno)
count=parseInt(count)
var start=(pno-1)*count
pool.query('SELECT * FROM xz_laptop LIMIT ?,?',[start,count],function(err,result){
if(err)throw err
	res.send(result)
})
})
module.exports=router